package com.pomr.util.page;

import java.io.Serializable;

/**
 * 分页控制
 * @author Administrator
 *
 */
public class PageManager<T> implements Serializable{
	

	public T getRows() {
		return rows;
	}

	public void setRows(T rows) {
		this.rows = rows;
	}


	//当前页码  从1开始
    private int page;  
    public PageManager(int page, int total, T rows) {
		super();
		this.page = page;
		this.total = total;
		this.rows = rows;
	}


	//全部数据  
    private int total;  
    public PageManager() {
		super();
	}


	//查询返回结果  
    private T rows;  
      
  
    public int getPage()  
    {  
        return page;  
    }  
  
    public void setPage(int page)  
    {  
        if(page<0){  
        	page=0;  
        }  
        this.page = page;  
    }  
  
  
    public int getTotal()  
    {  
        return total;  
    }  
  
    public void setTotal(int total)  
    {  
        if(total<0){  
            total=0;  
        }  
        this.total = total;  
    }  
  
  
    
}
